<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<%@include file="/components/common/head.ini"%>
	</head>
	<body>
		<form action="xtyh.do" method="post" >
			<!-- 多功能操作区 -->
			<div class="toolbox">
				<!-- 按钮 -->
				<div class="buttonbox">
					<ul>
						<li>
							<a id="add" class="btn_zj"> 增加 </a>
						</li>
						<li>
							<a id="edit" class="btn_xg"> 修改 </a>
						</li>
						<li>
							<a id="delete" class="btn_sc"> 删除 </a>
						</li>
						<li>
							<a id="dy" class="btn_dy" onclick="expTab('dy_area','','');"
								title="请检索您要打印的内容!"> 打 印 </a>
						</li>
					</ul>
				</div>
				<!-- 按钮 -->
				<!-- 过滤条件开始 -->
				<div class="searchbox">
					<p class="search_con">
						<span><label>
								请输入关键字
							</label> <input type="text" id="searchName" name="searchName" class="text_nor"
								style="width: 150px"
								onkeydown="if(event.keyCode==13) {return search()}"/>
							<input type="button" class="button" id="cx" name="cx" value="查 询" />
						</span>
					</p>
				</div>
			</div>
			<table id="myTab" cellpadding="0" cellspacing="0"></table>
			<div id="pager1"></div>
		</form>
		<jsp:include flush="true"
			page="/components/common/showgrid.jsp"></jsp:include>
		<!-- 内容显示区结束 -->
		<script language=javascript>
		
		jQuery(document).ready(function(){
			listData("list.action","userInfoList","listBean.action",{},"#myTab");
		
		});
		
		var action=document.forms[0].action;
		jQuery("#cx").click(function(){
			jQuery(window).resize();
		});

		jQuery("#add").click(function() {
		var url=action+"?theAction=edit";
			showTopWin(url,640,350,'no');
			//showTop("22",url,"300","500");
		});
			
		jQuery("#edit").click(function(){
		var id = getCheckBoxValue("#myTab");
			if(id!=""){
				if(id.length > 1){
					alert("只能选择一条数据进行修改!",true);
				}else{
					var url=action+"?theAction=edit&parameter.id="+id;
		 			showTopWin(url,620,480,"Y");
				}
			}else{
				alert("请选择一条数据进行修改!",true);
			}
		});
		
		jQuery("#delete").click(function(){
			var url = action + "?theAction=delete";
			var par = getCheckBoxValue("#myTab");
			deleteDataList(url,par,"#myTab");
		});
		
		function refersh(){
			jQuery("#myTab").jqGrid().trigger('reloadGrid');
		}
	</script>
	
	</body>
</html>